<%@ page language="java"%>

<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page import="com.vcs.domain.*,java.util.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <meta name="selection" content="hotjobsTab"> 
<title>Jobs in Bareilly | Sales Job</title>
</head>
<body>

<h3>Your Search Results</h3>

<hr />
<s:text name="job.search.page.header"></s:text>
<br />
<br />
<br />

<s:if test="#request.jobList != null">
	<table align="center" border="0" cellpadding="5" width="100%"
		bordercolor="black">

		<s:iterator value="#request.jobList" status="userStatus" var="job">
			<tr
				class="<s:if test="#userStatus.odd == true ">odd</s:if><s:else>even</s:else>">
				<td>
				<table cellpadding="3" cellspacing="0" border="0" width="100%"
					bordercolor="red">
					<tr>
						<td width="125"><strong>Job Title:</strong></td>
						<td style="color: maroon;">
						<table border="0" width="100%">
							<tr>
								<td><strong><s:property value="jobTitle" /></strong> <span
									style="color: #888888;">(Job Id:&nbsp; <s:property
									value="jobId" />)</span></td>
								<td align="right"><s:if test="#session.js != null">
									
																
									<s:url action="apply" namespace="/js"
										var="applyForJobUrl">
										<s:param name="jobId">
											<s:property value="jobId" />
										</s:param>
									</s:url>
							&nbsp;&nbsp;&nbsp;<a href="${applyForJobUrl}">Apply for this
									job</a>
								</s:if> <s:if test="#session.js == null">
									<s:if test="#session.client == null">
										<s:url action="registration" namespace="/js"
											var="jobseekerRegUrl" />
										<s:a href="%{jobseekerRegUrl}">Apply for this job</s:a>
									</s:if>
								</s:if></td>
								<td align="right"><s:if
									test='#session.client.role == "ADMIN"'>
									<s:url action="deletejob" namespace="/client"
										var="delJobUrl">
										<s:param name="jobId">
											<s:property value="jobId" />
										</s:param>
									</s:url>
									<s:a href="%{delJobUrl}">Delete This Job</s:a>
								</s:if> <s:if test='#session.client.role == "CLIENT"'>
									<s:url action="deletejob" namespace="/client"
										var="delJobUrl">
										<s:param name="jobId">
											<s:property value="jobId" />
										</s:param>
									</s:url>
									<s:a href="%{delJobUrl}">Delete This Job</s:a>
								</s:if></td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td><strong>Company Name:</strong></td>
						<td colspan="2"><s:property value="companyName" /></td>
					</tr>
					<tr>
						<td><strong>Required Skills:</strong></td>
						<td colspan="2"><s:property value="keySkills" /></td>
					</tr>
					<tr>
						<td><strong>Work Experience:</strong></td>
						<td colspan="2"><s:property value="minExp" /> - <s:property
							value="maxExp" /> Years</td>
					</tr>
					<tr>
						<td><strong>Job Location:</strong></td>
						<td colspan="2">
						<%
							List<Location> locList = (List<Location>) application
											.getAttribute("locationList");
									int id = ((Job) request.getAttribute("job"))
											.getJobLocation();

									String location = null;
									for (Location loc : locList) {
										if (loc.getId() == id) {
											location = loc.getName();
										}
									}
						%> <%=location%></td>

					</tr>
					<tr>
						<td><strong>Compensation:</strong></td>
						<td><s:property value="minCompensation"/>&nbsp;to&nbsp; <s:property value="maxCompensation"/> </td>
					</tr>
					<tr>
						<td style="vertical-align: top;"><strong>Job
						Profile:</strong></td>
						<td style="vertical-align: top;"><s:property
							value="jobDescription" /> <br />
						</td>
					</tr>
					<tr>
						<td style="vertical-align: top;"><strong>Company
						Profile:</strong></td>
						<td style="vertical-align: top;"><s:property
							value="companyProfile" /></td>
					</tr>
				</table>
				</td>
			</tr>
		</s:iterator>
	</table>
</s:if>

</body>
</html>